]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/theme-node-transition: Guard against 0-sized offscreen box
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Jun 2022 01:19:04 +0000 (03:19 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 4 Aug 2022 18:12:31 +0000 (18:12 +0000)
We know beforehand that setting up the framebuffers will fail in
that case, so we can avoid cluttering the log with warnings.

(Although the warning would likely indicate a stylesheet bug)

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/289

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2326>

src/st/st-theme-node-transition.c

index 61199b437ebbece353698e9174fe6956c6dae53e..20b1476d2d43e046a75e99b751e323462af45747 100644 (file)
@@ -369,7 +369,8 @@ st_theme_node_transition_paint (StThemeNodeTransition *transition,
       priv->last_allocation = *allocation;
 
       calculate_offscreen_box (transition, allocation);
-      priv->needs_setup = !setup_framebuffers (transition, allocation,
+      priv->needs_setup = clutter_actor_box_get_area (&priv->offscreen_box) == 0 ||
+                          !setup_framebuffers (transition, allocation,
                                                resource_scale);
 
       if (priv->needs_setup) /* setting up framebuffers failed */